from dto import *
import model

import model2DtoFactory

def get_groups(): 
    ret = []
    s = model.create_session()
    grupoModel = s.query(model.Grupo).order_by(model.Grupo.nombregrupo).all()
    for g in grupoModel:
        ret.append(model2DtoFactory.create_grupo(g))
        
    return ret